package com.ljw.gulimall.product.vo;

import com.ljw.gulimall.product.entity.SkuImagesEntity;
import com.ljw.gulimall.product.entity.SkuInfoEntity;
import com.ljw.gulimall.product.entity.SpuInfoDescEntity;
import lombok.Data;

import java.util.List;

@Data
public class SkuItemVo {

    //1、sku基本信息获取 pms_sku_info
    private SkuInfoEntity info;

    private Boolean hasStock = true;

    //2、sku的图片信息 pms_sku_images
    private List<SkuImagesEntity> images;

    //3、获取spu的销售属性组合
    private List<SkuItemSaleAttrsVo> saleAttr;

    //4、获取spu的介绍
    private SpuInfoDescEntity desp;

    //5、获取spu的规格参数信息
    List<SpuItemAttrGroupVo> groupAttrs;


    @Data
    public static class SkuItemSaleAttrsVo {

        private Long attrId;
        private String attrName;
        private List<AttrValueWithSkuIdVo> attrValues;
    }

    @Data
    public static class AttrValueWithSkuIdVo {
        private String attrValue;
        private String skuIds;
    }

    @Data
    public static class SpuItemAttrGroupVo{
        private String groupName;
        private List<SpuBaseAttrVo> attrs;
    }

    @Data
    public static class SpuBaseAttrVo{
        private String attrName;
        private String attrValue;

    }

}
